package com.iqiyi.pps.epg.api.server.iservice;

import com.iqiyi.mams.hedvig.http.mediatype.ExtendedMediaType;

import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * Created by karkarrotxu on 2016/9/18.
 */
@Path("/channel")
@Produces({ExtendedMediaType.APPLICATION_X_THRIFT})
public interface ChannelApiService {

    @POST
    @Path("/create")
    @Produces(MediaType.APPLICATION_JSON)
    public String createChannel(@FormParam("name") String name,
                                @FormParam("universalCode") String universalCode,
                                @FormParam("description") String description,
                                @FormParam("passportId") String passportId,
                                @FormParam("ppsBaikeId") String ppsBaikeId,
                                @FormParam("liveType") String liveType,
                                @FormParam("carousel_table_no") String carouselTableNo,
                                @FormParam("type") String type,
                                @FormParam("logoUrl") String logoUrl,
                                @FormParam("maxPlaybackPeriod") String maxPlaybackPeriod,
                                @FormParam("tempStartTime") String tempStartTime,
                                @FormParam("tempEndTime") String tempEndTime,
                                @FormParam("qitanId") String qitanId,
                                @FormParam("orderBy") String orderBy,
                                @FormParam("isEnable") String isEnable,
                                @FormParam("tag") String tag,
                                @FormParam("allowPopups") String allowPopups,
                                @FormParam("shouldDisplay") String shouldDisplay,
                                @FormParam("isQiyiProduced") String isQiyiProduced,
                                @FormParam("exclusiveStatusIqiyi") String exclusiveStatusIqiyi,
                                @FormParam("interruptHintType") String interruptHintType,
                                @FormParam("sliceDelay") int sliceDelay,
                                @FormParam("subjectUrl") String subjectUrl,
                                @FormParam("automation") int automation,
                                @FormParam("userCount") int userCount,
                                @FormParam("cyclical") int cyclical,
                                @FormParam("formal") int formal,
                                @FormParam("alternatePlayCollection") String alternatePlayCollection);

    @POST
    @Path("/edit")
    @Produces(MediaType.APPLICATION_JSON)
    public String editChannel(@FormParam("id") String id,
                              @FormParam("name") String name,
                              @FormParam("universalCode") String universalCode,
                              @FormParam("description") String description,
                              @FormParam("passportId") String passportId,
                              @FormParam("ppsBaikeId") String ppsBaikeId,
                              @FormParam("liveType") String liveType,
                              @FormParam("carousel_table_no") String carouselTableNo,
                              @FormParam("type") String type,
                              @FormParam("logoUrl") String logoUrl,
                              @FormParam("maxPlaybackPeriod") String maxPlaybackPeriod,
                              @FormParam("tempStartTime") String tempStartTime,
                              @FormParam("tempEndTime") String tempEndTime,
                              @FormParam("qitanId") String qitanId,
                              @FormParam("orderBy") String orderBy,
                              @FormParam("isEnable") String isEnable,
                              @FormParam("tag") String tag,
                              @FormParam("allowPopups") String allowPopups,
                              @FormParam("shouldDisplay") String shouldDisplay,
                              @FormParam("isQiyiProduced") String isQiyiProduced,
                              @FormParam("exclusiveStatusIqiyi") String exclusiveStatusIqiyi,
                              @FormParam("interruptHintType") String interruptHintType,
                              @FormParam("sliceDelay") int sliceDelay,
                              @FormParam("subjectUrl") String subjectUrl,
                              @FormParam("userCount") int userCount,
                              @FormParam("cyclical") int cyclical,
                              @FormParam("formal") int formal,
                              @FormParam("alternatePlayCollection") String alternatePlayCollection);

    @POST
    @Path("/get")
    @Produces(MediaType.APPLICATION_JSON)
    public String getChannel(@FormParam("id") String id);

    @POST
    @Path("/carouselTableNo")
    @Produces(MediaType.APPLICATION_JSON)
    public String carouselTableNo(@FormParam("carousel_table_no") String carousel_table_no,
                                  @FormParam("type") int type,
                                  @FormParam("channelId") String channelId);

    @POST
    @Path("/loglist")
    @Produces(MediaType.APPLICATION_JSON)
    public String getChannelLogList(@FormParam("id") String channelId,
                                    @FormParam("pageNo") Integer pageNo,
                                    @FormParam("pageSize") Integer pageSize
    );

    @POST
    @Path("/codelist")
    @Produces(MediaType.APPLICATION_JSON)
    public String getChannelCodeList(@FormParam("key") String key);

    @POST
    @Path("/setPanoFormat")
    @Produces(MediaType.APPLICATION_JSON)
    public String setPanoFormat(@FormParam("channelId") String channelId,
                                @FormParam("videoType") String videoType,
                                @FormParam("angleX") String angleX,
                                @FormParam("angleY") String angleY,
                                @FormParam("zoomRate") String zoomRate);
    @POST
    @Path("/setThreeD")
    @Produces(MediaType.APPLICATION_JSON)
    public String setThreeD(@FormParam("channelId") String channelId,
                            @FormParam("videoType") String videoType);

    @POST
    @Path("/del")
    @Produces(MediaType.APPLICATION_JSON)
    public String delChannel(@FormParam("id") final String id);

    @POST
    @Path("/list")
    @Produces(MediaType.APPLICATION_JSON)
    public String channelList(@FormParam("liveType") String liveType,
                              @FormParam("type") String type,
                              @FormParam("qipuId") String qipuId,
                              @FormParam("name") String name,
                              @FormParam("startDate") String startDate,
                              @FormParam("endDate") String endDate,
                              @FormParam("isEnable") String isEnable,
                              @FormParam("isDelete") String isDelete,
                              @FormParam("pageNo") Integer pageNo,
                              @FormParam("pageSize") Integer pageSize);

    @POST
    @Path("/image")
    @Produces(MediaType.APPLICATION_JSON)
    public String channelImage(@FormParam("entityId") String entityId,
                               @FormParam("url") String url,
                               @FormParam("extend") String extend,
                               @FormParam("code") String code,
                               @FormParam("message") String message);

    @POST
    @Path("/charge")
    @Produces(MediaType.APPLICATION_JSON)
    public String chargeChannel(@FormParam("qipuId") String qipuId,
                                @FormParam("purchaseType") String purchaseType
    );

    @POST
    @Path("/getPreviewStream")
    @Produces(MediaType.APPLICATION_JSON)
    public String getPreviewStream(@FormParam("qipuId") String qipuId);

    @POST
    @Path("/getPlatSettings")
    @Produces(MediaType.APPLICATION_JSON)
    public String getPlatSettings(@FormParam("channelId") String channelId);

    @POST
    @Path("/savePlatSettings")
    @Produces(MediaType.APPLICATION_JSON)
    public String savePlatSettings(@FormParam("channelId") String channelId, @FormParam("configData") String configData);

    @POST
    @Path("/find/pca")
    @Produces(MediaType.APPLICATION_JSON)
    public String pcaChannelFind(@FormParam("categoryId") String categoryId,
                                 @FormParam("channelId") String channelId,
                                 @FormParam("channelName") String channelName,
                                 @FormParam("pageNo") Integer pageNo,
                                 @FormParam("pageSize") Integer pageSize);
}
